const rp = require('request-promise-native');

let options = {
  method: 'GET',
  uri: 'http://www.baidu.com'
};

const test = async ()=>{
  try{
    let res = await rp(options);
    console.log(res);
  }catch(e){
    console.log('error ------> ', e);
  }
};

test();